import { getApiData } from "../../../../../tools/HttpClient";
// 获取左侧切换的数据
export async function getSubjectType(params) {
    const res = await getApiData("account.subject.getType", params);
    if (res.ok) {
        return res.data;
    }
    return {};
}
// 获取右侧表格数据
// account.subjectSDB.getDataList
export async function getSubjectSDB(params) {
    const res = await getApiData("account.subjectSDB.getDataList", params);
    if (res.ok) {
        return res.data;
    }
    return {};
}
// 获取辅助账的核算项目类型
export async function AssistgetType(params) {
    const res = await getApiData("account.assist.getType", params);
    if (res.ok) {
        return res.data;
    }
    return [];
}
// 获取科目是否存在辅助账
export async function SubjectIsHasFZZ(params) {
    const res = await getApiData("account.subject.isHasFZZ", params);
    if (res.ok)
        return res.data;
}
// 是否可以增加辅助账
export async function IsCanAddFZZ(params) {
    const res = await getApiData("account.subject.isCanAddFZZ", params);
    if (res.ok)
        return res.data;
}
// 自动增加下级辅助账
export async function AutoAddChildrenForFZZ(params) {
    const res = await getApiData("account.subject.autoAddChildrenForFZZ", params);
    if (res.ok)
        return res.data;
}
// 获取一个当前科目 自动增加第一个子科目
// account.subject.autoAddFirstChildren
export async function autoAddFirstChildren(params) {
    const res = await getApiData("account.subject.autoAddFirstChildren", params);
    if (res.ok) {
        return res;
    }
    else {
        return res;
    }
}
// 获取一个新科目编号
export async function getNewKMBH(params) {
    const res = await getApiData("account.subject.getNewKMBH", params);
    if (res.ok) {
        return res;
    }
    else {
        return res;
    }
}
// 删除科目
export async function SubjectDel(params) {
    const res = await getApiData("account.subject.del", params);
    if (res.ok) {
        return res;
    }
    else {
        return res;
    }
}
// 编辑科目
export async function Editsubject(params) {
    const res = await getApiData("account.subject.edit", params);
    if (res.ok) {
        return res;
    }
    else {
        return res;
    }
}
// 增加科目
export async function Addsubject(params) {
    const res = await getApiData("account.subject.add", params);
    if (res.ok) {
        return res;
    }
    else {
        return res;
    }
}
